import axios from 'axios';
var qs = require('qs');
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
let base='' ;


//查询学生信息详情
export const queryStuInfo = params => { return axios.post('/api/student/checkStuPass', qs.stringify(params)).then(res => res.data); };

//修改学生信息
export const updateStuInfo = params => { return axios.post('/api/student/updateStudentInfo', qs.stringify(params)).then(res => res.data); };
//修改密码
export const editPass = params => { return axios.post('/api/student/editPass', qs.stringify(params)).then(res => res.data); };

//用户登陆
export const requestLogin = params => { return axios.post('/api/student/login', qs.stringify(params)).then(res => res.data); };
//添加学生课程评价
export const saveCourseEvaluate = params => { return axios.post('/api/student/saveCourseEvaluate', qs.stringify(params)).then(res=>res.data);};
//用户退出
export const requestLogout = params => { return axios.post('/api/student/logout', qs.stringify(params)).then(res => res.data); };
//学生端查看自己的信息
export const studentSelfInfo = params => { return axios.post('/api/student/studentSelfInfo', qs.stringify(params)).then(res => res.data); };


//学生主页获取学生课程信息
export const listCourse = params => { return axios.post('/api/student/listCourse', qs.stringify(params)).then(res => res.data); };
//学生查询自己的考试安排
export const listExamOrder = params => { return axios.post('/api/student/listExamOrder', qs.stringify(params)).then(res => res.data); };
//学生点播视频
export const downloadVideo = params => { return axios.post('/api/student/downloadViedo',qs.stringify(params)).then(res => res.data); };
//获取课程详细章节
export const getCourseById = params => { return axios.post('/api/student/getCourseById',qs.stringify(params)).then(res => res.data); };
//获取公告详细内容
export const getNoticeById = params => {return axios.post('/api/student/getNoticeById',qs.stringify(params)).then(res => res.data);};
//获取章节详细信息
export const getPartSectionBySectionId = params => {return axios.post('/api/student/getPartSectionBySectionId',qs.stringify(params)).then(res => res.data);};

//获取所有公告
export const listNotice = params => {return axios.post('/api/student/listNotice',qs.stringify(params)).then(res=> res.data);};
//学生端下载资源文件
export const downResource = params => {return axios.post('/api/student/downResource',qs.stringify(params)).then(res=> res.data);};
//获取所有资源文件
export const listResource = params => {return axios.post('/api/student/listResource',qs.stringify(params)).then(res=> res.data);};
//提交论文
export const add = params => {return axios.post('/api/student/thesis/add',qs.stringify(params)).then(res=> res.data);};
//论文下载
export const downloadThesis = params => {return axios.post('/api/student/thesis/download',qs.stringify(params)).then(res=> res.data);};
//获取论文题目及规范列表
export const queryThesisLayout = params => {return axios.post('/api/student/thesisLayout/queryThesisLayout',qs.stringify(params)).then(res=> res.data);};
//异动申请列表
export const queryTransaction = params => {return axios.post('/api/student/transaction/queryTransaction',qs.stringify(params)).then(res=> res.data);};
//填写异动申请表
export const save = params => {return axios.post('/api/student/transaction/save',qs.stringify(params)).then(res=> res.data);};
//检查异动
export const validation = params => {return axios.post('/api/student/transaction/validation',qs.stringify(params)).then(res=> res.data);};
//添加章节测试信息
export const saveSectionTest = params => { return axios.post('/api/student/saveSectionTest', qs.stringify(params)).then(res=>res.data);};


//获取学生论文信息
export const showThesisByPage = params => { return axios.post('/api/student/thesis/showThesisByPage', qs.stringify(params)).then(res=>res.data);};
//学生准考证下载
export const downloadExam = params => { return axios.post('/api/student/download', qs.stringify(params)).then(res=>res.data);};
//获取学生信息
export const getStudentInfo = params => { return axios.post('/api/student/getStudentInfo', qs.stringify(params)).then(res=>res.data);};
//获取某专业的教学计划
export const listEducation = params => { return axios.post('/api/student/listEducation', qs.stringify(params)).then(res=>res.data);};
//根据课程id获取对应的试卷
export const listExamPaper = params => { return axios.post('/api/student/listExamPaper', qs.stringify(params)).then(res=>res.data);};
//获取学生成绩
export const listScore = params => { return axios.post('/api/student/listScore', qs.stringify(params)).then(res=>res.data);};
//获取章节测试列表
export const listSectionTest = params => { return axios.post('/api/student/listSectionTest', qs.stringify(params)).then(res=>res.data);};
//根据章节测试id获取对应的测试题目
export const listSectionTestPaper = params => { return axios.post('/api/student/listSectionTestPaper', qs.stringify(params)).then(res=>res.data);};
//获取某学生所选课程的教师信息
export const listTeacherByStuId = params => { return axios.post('/api/student/listTeacherByStuId', qs.stringify(params)).then(res=>res.data);};
//预约考试
export const saveExamOrder = params => { return axios.post('/api/student/saveExamOrder', qs.stringify(params)).then(res=>res.data);};
//添加考试成绩
export const saveScore = params => { return axios.post('/api/student/saveScore', qs.stringify(params)).then(res=>res.data);};

//教师评价
export const saveTeacherEvaluate = params => { return axios.post('/api/student/saveTeacherEvaluate', qs.stringify(params)).then(res=>res.data);};
